package com.sg.model.oms.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import com.sg.framework.common.po.BaseEntity;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.io.Serial;
import java.util.Date;

/**
 * 备注：1、简易版组织架构与简易权限未来实现逻辑，建立一个权限分配表的副表，标记权限的 主管、成员的子权限区分，本期不做2、通过职务关联角色，继承全新。有空间，有应用
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_framework_privacy_distribution")  //1-2-12权限分配表（01）
public class PrivacyDistribution implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 权限分配ID
     */
    @TableId(value = "privacy_distribution_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "privacyDistributionId不能为空")
    private String privacyDistributionId;
    /**
     * 权限ID
     */
    @TableField(value = "privacy_id")
    @NotNull(message = "权限ID不能为空")
    @Schema(description = "权限ID")
    private String privacyId;
    /**
     * 权限标识
     */
    @TableField(value = "privacy_code")
    @NotNull(message = "权限标识不能为空")
    @Schema(description = "权限标识")
    private String privacyCode;
    /**
     * 是否接口权限 TRUE:是 FALSE:否
     */
    @TableField(value = "isport_privacy")
    @NotNull(message = "是否接口权限不能为空")
    @Schema(description = "是否接口权限")
    private String isportPrivacy;
    /**
     * 权限路由
     */
    @TableField(value = "privacy_route")
    @Schema(description = "权限路由")
    private String privacyRoute;
    /**
     * 是否数据权限 TRUE:是 FALSE:否
     */
    @TableField(value = "is_data_privacy")
    @NotNull(message = "是否数据权限不能为空")
    @Schema(description = "是否数据权限")
    private String isDataPrivacy;
    /**
     * 数据父模型编码 STRATEGY_PLAN_SCENE:战略规划场景 KPI_SCENE:工作绩效 EVALUATIONAPP_PRIVACY:评价应用
     */
    @TableField(value = "data_model")
    @Schema(description = "数据父模型编码")
    private String dataModel;
    /**
     * 权限类别 MAIN_DATA_PRIVACY:父级数据权限 SUB_DATA_PRIVACY:子级数据权限 COMMON_PRIVACY:普通权限
     */
    @TableField(value = "privacy_category")
    @Schema(description = "权限类别")
    private String privacyCategory;
    /**
     * 权限业务用途 BROWSE:浏览权限 ALL:管理全部权限
     */
    @TableField(value = "business_purposes")
    @Schema(description = "权限业务用途")
    private String businessPurposes;
    /**
     * 分配对象类型编码 ROLE:角色 DEPARTMENT:部门 PERSONAL:个人 POSITION:职务 DEPARTMENT_POSITION:部门职务 PERSONAL_DEPARTMENT:部门个人 BUSINESS_APPLICATION:业务应用
     */
    @TableField(value = "type_code")
    @NotNull(message = "分配对象类型编码不能为空")
    @Schema(description = "分配对象类型编码")
    private String typeCode;
    /**
     * 分配对象ID
     */
    @TableField(value = "allocation_object_id")
    @NotNull(message = "分配对象ID不能为空")
    @Schema(description = "分配对象ID")
    private String allocationObjectId;
    /**
     * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @TableField(value = "subject_life_cycle")
    @NotNull(message = "主体生命周期不能为空")
    @Schema(description = "主体生命周期")
    private String subjectLifeCycle;
    /**
     * 是否存档 TRUE:是 FALSE:否
     */
    @TableField(value = "is_archive")
    @NotNull(message = "是否存档不能为空")
    @Schema(description = "是否存档")
    private String isArchive;
    /**
     * 操作人就职记录ID
     */
    @TableField(value = "operation_induction_id")
    @NotNull(message = "操作人就职记录ID不能为空")
    @Schema(description = "操作人就职记录ID")
    private String operationInductionId;
    /**
     * 创建人就职记录ID
     */
    @TableField(value = "create_induction_id")
    @NotNull(message = "创建人就职记录ID不能为空")
    @Schema(description = "创建人就职记录ID")
    private String createInductionId;
    /**
     * 发布人就职记录ID 
     */
    @TableField(value = "release_induction_id")
    @NotNull(message = "发布人就职记录ID 不能为空")
    @Schema(description = "发布人就职记录ID ")
    private String releaseInductionId;
    /**
     * 存档人就职记录ID
     */
    @TableField(value = "archive_induction_id")
    @NotNull(message = "存档人就职记录ID不能为空")
    @Schema(description = "存档人就职记录ID")
    private String archiveInductionId;
    /**
     * 操作时间
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    private Date operateTime;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;
    /**
     * 发布时间
     */
    @TableField(value = "release_time")
    @NotNull(message = "发布时间不能为空")
    @Schema(description = "发布时间")
    private Date releaseTime;
    /**
     * 存档时间
     */
    @TableField(value = "archive_time")
    @NotNull(message = "存档时间不能为空")
    @Schema(description = "存档时间")
    private Date archiveTime;
    /**
     * 是否作废 TRUE:是 FALSE:否
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;
    /**
     * 创建于空间ID
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;
    /**
     * 创建于联盟应用ID
     */
    @TableField(value = "app_id")
    @NotNull(message = "创建于联盟应用ID不能为空")
    @Schema(description = "创建于联盟应用ID")
    private String appId;
}
